package cn.zyl.demo.common.boot.exception;

/** BootBaseException异常类说明: boot模块通用异常
 * @author wsz
 * @date 2020-08-03
 * @version v1.0
 */
public class BootBaseException extends RuntimeException {
    public BootBaseException(String msg){ super(msg);}
    public BootBaseException(Throwable e){ super(e);}
    public BootBaseException(String msg,Throwable e){ super(msg,e);}
    public static void isTrueThrow(boolean boo,String msg) throws BootBaseException{
        if(boo){throw new BootBaseException(msg);}
    }
    public static void isTrueThrow(boolean boo,Throwable e) throws BootBaseException{
        if(boo){throw new BootBaseException(e);}
    }
    public static void isNullThrow(Object o,String msg) throws BootBaseException{
        isTrueThrow(null == o,msg);
    }
}